# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=leptonica
pkgver=1.80.0
pkgrel=0
pkgdesc="Software that is broadly useful for image processing and image analysis applications"
url="http://www.leptonica.com/"
arch="all"
license="custom"
makedepends="libjpeg-turbo-dev tiff-dev libpng-dev zlib-dev giflib-dev libwebp-dev"
subpackages="$pkgname-dev"
source="https://github.com/DanBloomberg/leptonica/releases/download/$pkgver/leptonica-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/*.a "$pkgdir"/usr/lib/*.la
}

sha512sums="f8062a169b7ac558c8818615e534c0dcb5db48924af4d3106d0e0929e9b2f03347bdeaae45f80bded0b2aed135bb133f775244c8c752891ca4948b5d6b21e147  leptonica-1.80.0.tar.gz"
